/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.neuralnetwork;

import java.util.ArrayList;
import java.util.Arrays;

/**
 *
 * @author afspear
 */
public class TesterMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Network ann = new Network(2, 1, 1);
        ArrayList<Double> myArray = new ArrayList<Double>(Arrays.asList(0.0,0.0)); 
        ann.fillInputsWithdata(myArray);
        ArrayList <Double> outputs = ann.pushUpAnswer();
        double [] desiredOutputs = {0};
        
        while (Math.abs(Math.abs(outputs.get(0) - (Double) desiredOutputs[0]))>.00001) 
        {            
            System.out.println(outputs.get(0));
            Trainer.trainNetwork(desiredOutputs, ann);
            outputs = ann.pushUpAnswer();
        }
        
    }
}
